﻿using System;
using System.Collections.Generic;
using System.Windows.Controls;

namespace Dsl.Ped.Framework.Common
{
    /// <summary>
    /// Base class for projective objects, each projective object must inherit this class
    /// and implement its methds
    /// </summary>
    [Serializable]
    public abstract class ProjectiveBase
    {
        /// <summary>
        /// Get new instances of <see cref="ProjectionContainer"/>. It is important to return
        /// new instances, because <see cref="ProjectionContainer"/> contains <see cref="Projection"/> elements, which 
        /// are of <see cref="UserControl"/> <see cref="Type"/>.
        /// 
        /// Since the business model (instance being edited in some projection) must exist only in one instance, but is bound
        /// to several projections, it might happened that an attempt to assign one <see cref="UserControl"/> to more then one 
        /// <see cref="ProjectionContainer"/> would be done, what would result in the application crash!
        /// </summary>
        /// <returns></returns>
        public abstract List<IProjectionContainer> GetProjectionContainers();
    }
}